<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width = device-width, initial-scale = 1.0, minimum-scale = 1.0, maximum-scale = 1.0, user-scalable = no"/>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<title>店铺 名称</title>
<link type="text/css" href="css/reset.css" rel="stylesheet" />
<link type="text/css" href="css/public.css" rel="stylesheet" />
<link type="text/css" href="css/style.css" rel="stylesheet" />
<link type="text/css" href="css/wode.css" rel="stylesheet" />
<script>
    var deviceWidth = Math.min(640, window.innerWidth)
    document.documentElement.style.fontSize = deviceWidth / 7.5 + "px"
</script>
  <script src="js/jquery.min.js?v=2.1.4"></script>
 <script src="js/core.js"></script>
<script src="js/zhiboweibodetail.js"></script>>

</head>

<body>
<!-- top -->
<div class="header">
    <header class="p_header public-red">
        <a href="javascript:history.go(-1);" class="p_header_left">
            <i class="p_left" title="返回"></i>
        </a>
        <h1 class="p_dizhi"></h1>
    </header>
</div>
<!--店铺-->
<div class="zhibo_detail">
	
</div>
<div class="zhibo_detail_anniu">
	<ul class="clearfix">
		<li id="tixing" class="" style="width: 95%;" onclick="shezhi(this)">设置提醒</li>
		<!--<li class="jg_share">分享</li>-->
	</ul>
</div>

<!--产品-->
<div class="goods_title">直播商品</div>
<div class="clearfix" id="goodslist">

</div>



<!--分享-->

<script>
	function shezhi(te){
	     var zhiboid=$(te).attr("class");
	     if(zhiboid!=""){
	     	 if(uuuuid!=""){
	    $.ajax({
        url:urlcore+"/api/zbDirectSeeding/getZbRemind2?id="+uuuuid+"&userId="+zhiboid,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
					alert("已设置");
				}else{
					alert(data.msg);
				}
			},
			error: function() {
				alert("error");
			}
		});
		 }else{
		 	alert("未登录请登录");
		 }
	     }
	}
</script>
<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
	
	$(function(){
	 var id = getvl("id");
        if(id != '') {
        	zhibodeta(id);
        }else{
        	alert("无有效参数！");
        }
});

function zhibodeta(id){
	    $.ajax({
        url:urlcore+"/api/zbDirectSeeding/selectOne?id="+id,
			type: "get",
			dataType: 'json',
			contentType: "application/json;charset=utf-8",
			success: function(data) {
				if(data.success == true) {
					var da=data.data;
					$("#tixing").attr("class",da.shopInfo.userId);
var time=da.startTime; 
var year=time.substr(0,4); 
var index1=time.indexOf("-"); 
var index2=time.lastIndexOf("-"); 
var cha=parseInt(index2)-(parseInt(index1)+1); 
var month=time.substr((parseInt(index1)+1),cha); 

var kg=time.indexOf(" "); 
cha=parseInt(kg)-parseInt(index2); 
var day=time.substr(parseInt(index2)+1,cha); 
var mh=time.indexOf(":"); 
cha=parseInt(mh)-(parseInt(kg)+1); 
var hour=time.substr(parseInt(kg)+1,cha); 
var mh2=time.lastIndexOf(":"); 
cha=parseInt(mh2)-(parseInt(mh)+1); 
var fen=time.substr(parseInt(mh)+1,cha); 
		
					$(".p_dizhi").text(da.shopInfo.storeName);
					var zhibo_detail='<div class="zhibo_top">'+
		'<dl class="clearfix">'+
			'<dt>'+
				'<a href="6.0.0dianpu.html?ids='+da.user.id+'">'+
					'<img src="'+da.user.headImg+'" />'+
				'</a>'+
			'</dt>'+
			'<dd>'+
				'<h5>'+da.title+'</h5>'+
				'<p>直播期间一律'+da.packRate+'折</p>'+
			'</dd>'+
		'</dl>'+
		'<h6>'+month+'月'+day+'号 '+hour+':'+fen+'开播</h6>'+
	'</div>'+
	'<div class="zhibo_detail_bg"></div>';
	$(".zhibo_detail").append(zhibo_detail);
	
		$.each(da.goodsList,function(y,m){
			var clearfix='<div class="public_goods">'+
		'<a href="7.0.0goods_detail.html?id='+m.id+'">'+
			'<dl>'+
				'<dt>'+
				'<img onerror="errorImg(this)" src="'+m.coverUrl+'" />'+
				'</dt>'+
				'<dd>'+
					'<h5>'+m.goodsTitle+'</h5>'+
					'<h6>直播期间所有商品有折扣哦</h6>'+
				'</dd>'+
			'</dl>'+
		'</a>'+
	'</div>';
	            $("#goodslist").append(clearfix);
		});
		
				
			
				}
			},
			error: function() {
				alert("error");
			}
		});

}

//下拉菜单
	$(function(){ 
		$('.retrie dt a').click(function(){
			var $t=$(this);
			if($t.hasClass('up')){
				$(".retrie dt a").removeClass('up');
				$('.downlist').hide();
			}else{
				$(".retrie dt a").removeClass('up');
				$('.downlist').hide();
				$t.addClass('up');
				$('.downlist').eq($(".retrie dt a").index($(this)[0])).show();
			}
		});			
		$(".area ul li").on('click',function(){
			$(".retrie dt a").removeClass('up');
			$(".downlist").hide();
			$("#area span").text($(this).html());
//			mmSort = $(this).attr("sort-Screen");
//	        pageNo = 1;
//			loadData(pageNo);
		})
		
		// tab切换
        $(function () {
           $('.w_xxtab_tit li').on('click',function(){
                //获得当前被点击的元素索引值
                var Index = $(this).index();
                //给菜单添加选择样式
                $(this).addClass('w_on1').siblings().removeClass('w_on1');
                //显示对应的div
                				$('.w_xxtaba').children('div').eq(Index).show().siblings('div').hide();
           });
        });
		$(".haozhai_quyu ul li").on('click',function(){
			$(".retrie dt a").removeClass('up');
			$(".downlist").hide();
			$("#wage span").text($(this).html());
//			mmSort = $(this).attr("sort-Screen");
//	        pageNo = 1;
//			loadData(pageNo);
		})
		
		
		
		$(".price ul li").on('click',function(){
			$(".retrie dt a").removeClass('up');
			$(".downlist").hide();
			$("#price span").text($(this).html());
//			mmSort = $(this).attr("sort-Screen");
//	        pageNo = 1;
//			loadData(pageNo);
		})
	});
	
	//固定
//	$(document).ready(function(){
//		var topMain=$(".header").height();//获取到头部的高度
//		var Logo=$("#Class");
//		$(window).scroll(function(){
//			if($(window).scrollTop()>topMain){
//				Logo.addClass("ScrollNav").css("z-index","102");
//			}else{
//				Logo.removeClass("ScrollNav");}
//		});
//	
//	});
	
	
	//分享
	$(function(){
		//弹出
		$('.jg_share').on('click',function(){		
			$("body").append("<div id='mask'></div>");
        	$(".public_share").show();
		});	
		//点击关闭
		$(".public_share_quxiao").on('click',function(){
	        $(".public_share").hide();
	        $("#mask").remove();
	    }) 
	    $("#mask").on('click',function(){
	        $(".public_share").hide();
	        $("#mask").remove();
	    }) 
	});
	
	
	
</script>
</body>
</html>